$('#confirm').on('click',function(){
    var productName=$('input[name=productName]').val();
    var currentpriceProduct=$('input[name=currentpriceProduct]').val();
    var condition=$('input[name=condition]').val();
    if(condition=="上架"){
        condition=1;
    }else if(condition=="下架"){
        condition=2;
    }else{
        condition=null;
    }
    var productLabel=$('input[name=productLabel]').val();
    var prodesc1=$('textarea[name=productDescription]').val();
    parent.$("input[name='productName1']").val(productName);
    parent.$("input[name='currentpriceProduct1']").val(currentpriceProduct);
    parent.$("input[name='condition1']").val(condition);
    parent.$("input[name='productLabel1']").val(productLabel);
    parent.$("input[name='productDescription1']").val(prodesc1);

    parent.Modify();

    var layer_1=parent.layer_1;
    layer_1.close(layer_1.index);
});
//取消
$('#cancel').on('click',function(){
    var layer_1=parent.layer_1;
    layer_1.close(layer_1.index);
})